package com.hxk.juc.thread.CCS;

public enum CountDownLatchEnum {
    ONE(1,"齐"),
    TOW(2,"楚"),
    THREE(3,"燕"),
    FOUR(4,"韩"),
    FIVE(5,"赵"),
    SIX(6,"魏");

    private Integer code;

    private String country;

    CountDownLatchEnum(Integer code, String country) {
        this.code = code;
        this.country = country;
    }

    public Integer getCode() {
        return code;
    }

    public String getCountry() {
        return country;
    }

    public static String getC(int code){
        CountDownLatchEnum[] values = CountDownLatchEnum.values();
        for (CountDownLatchEnum value : values) {
            if (value.getCode() == code) {
                return value.getCountry();
            }
        }
        return null;
    }
}
